# encoding=utf-8
from threading import Thread

from background.updateUserState import update_state
from background.get_new_infos import get_unread_info


def run_all_bg():
    # 每5秒更新用户状态
    update_state_thread = Thread(target=update_state)
    update_state_thread.start()
    # update_state_thread.join()

    # 每1秒获取消息
    get_unread_info_thread = Thread(target=get_unread_info)
    get_unread_info_thread.start()
    # get_unread_info_thread.join()

